package com.wtwd.device.dao;


import com.wtwd.device.model.entity.HeartRateRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author mjy
 * @date 2021/09/02
 * @description
 */
@Mapper
public interface HeartRateMapper {
    List<HeartRateRecord> getDaysHeartRateList(@Param("deviceId") Integer deviceId, @Param("startTime") String startTime, @Param("endTime") String endTime);

    List<HeartRateRecord> getMonthHeartRateList(@Param("deviceId") Integer deviceId,@Param("month") String month);

    Integer addHeartRate(HeartRateRecord heartRateRecord);

    HeartRateRecord getHeartRateByDeviceIdAndTime(@Param("deviceId") Long deviceId,@Param("time") String time);

    Integer clearHeartRateByDate(@Param("date") String date);

    Integer deleteHeartRateByDeviceId(@Param("id") Long id);
}
